package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏西西
 * Date: 2023-10-08
 * Time: 8:29
 */
public class IODemo7 {
   //进行写文件
   public static void main(String[] args) throws IOException {
//       OutputStream outputStream = new FileOutputStream("d:/test.txt");
//       outputStream.write(97);
//       outputStream.write(98);
//       outputStream.write(99);
//       outputStream.write(100);
//
//       outputStream.close();

      try(OutputStream outputStream = new FileOutputStream("d:/test.txt")) {
          outputStream.write(97);
          outputStream.write(98);
          outputStream.write(99);
          outputStream.write(100);

      }
   }
}
